import { DEFAULT_LAYOUT } from '../base';
import { AppRouteRecordRaw } from '../types';

const WEIXIN: AppRouteRecordRaw = {
  path: '/weixin',
  name: 'weixin',
  component: DEFAULT_LAYOUT,
  meta: {
    locale: '微信',
    requiresAuth: true,
    icon: 'IconWechat',
    order: 0,
  },
  children: [
    {
      path: 'workplace',
      name: 'Workplace',
      component: () => import('@/views/weixin/index.vue'),
      meta: {
        locale: '微信号列表',
        // icon: 'IconList',
        requiresAuth: true,
        roles: ['*'],
      },
    },
    {
      path: 'contacts',
      name: 'contacts',
      component: () => import('@/views/weixin/contacts/index.vue'),
      meta: {
        locale: '通讯录管理',
        // icon: 'IconList',
        requiresAuth: true,
        roles: ['*'],
      },
    },
    {
      path: 'chatmsg',
      name: 'chatmsg',
      component: () => import('@/views/weixin/chatmsg/index.vue'),
      meta: {
        locale: '对话管理',
        // icon: 'IconList',
        requiresAuth: true,
        roles: ['*'],
      },
    },
    {
      path: 'vip',
      name: 'vip',
      component: () => import('@/views/weixin/vip/index.vue'),
      meta: {
        locale: 'vip管理',
        // icon: 'IconList',
        requiresAuth: true,
        roles: ['*'],
      },
    },
    {
      path: 'manage/:id',  // 添加管理页面路由
      name: 'WeixinManage',
      component: () => import('@/views/weixin/manage.vue'),
      meta: {
        locale: 'menu.weixin.manage',
        requiresAuth: true,
        roles: ['*'],
        hideInMenu: true,
      },
    },
  ],
};

export default WEIXIN;
